hvmloader: Avoid bogus use of NULL pointer.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 31 Jul 2007 14:09:45 +0000 (15:09 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 31 Jul 2007 14:09:45 +0000 (15:09 +0100)
Signed-off-by: Keir Fraser <keir@xensource.com>
tools/firmware/hvmloader/smbios.c

index 93f89e38f066bdadb2e8b2256ccb3e64968efec1..fed2df5bfc58a9cb5492236558d7ca5df5afdfa0 100644 (file)
@@ -169,7 +169,7 @@ hvm_write_smbios_tables(void)
     /* temporary variables used to build up Xen version string */
     char *p = NULL; /* points to next point of insertion */
     unsigned len = 0; /* length of string already composed */
-    char *tmp = NULL; /* holds result of itoa() */
+    char tmp[16]; /* holds result of itoa() */
     unsigned tmp_len; /* length of next string to add */
 
     hypercall_xen_version(XENVER_guest_handle, uuid);